//
//  ES1Renderer.h
//  MSAATest
//
//  Created by Feng Ye on 10-8-5.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import "ESRenderer.h"

#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import "OpenGLCommon.h"
#import "ConstantsAndMacros.h"
#import <CoreMotion/CoreMotion.h>

@interface ES1Renderer : NSObject <ESRenderer>
{
@private
    EAGLContext *context;

    // The pixel dimensions of the CAEAGLLayer
    GLint backingWidth;
    GLint backingHeight;

    // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view
    GLuint defaultFramebuffer, colorRenderbuffer;
	// MSAA enabled buffers
	GLuint msaaFramebuffer, msaaRenderbuffer, msaaDepthbuffer;
    
    
    float lineSpace;
    int pointCount;
    
    Vertex3D *vertices;
    GLubyte *icosahedronFaces;
    float roll_degree;
    float pitch_degree;
    float yaw_degree;
    
    BOOL viewSetup;
    
    CMMotionManager *motionManager;
    
}


- (void)render;
- (BOOL)resizeFromLayer:(CAEAGLLayer *)layer;

@end
